if not isinstance(val, self.protocol.ns.cid_class):
raise TypeError('Was expecting type %r for guid, got %r (type=%r)', self.protocol.cid_class, val, type(val))
self._guid = val
guid = property(_get_guid, _set_guid, doc = 'Contact ID, which takes the form of a UUID in modern versions of MSNP.In the past, it was simply the passport name of the contact.')
def get_caps(self):
caps = caps
import common
if self.status == 'mobile':
return set([
caps.SMS,
caps.EMAIL])
else:
buddy_caps = set(self.protocol.caps)
if not self.online:
buddy_caps.discard(caps.FILES)
return buddy_caps
caps = property(get_caps)
def _set_contactsoap(self, val):
self._contactsoap = val
if self.contactsoap is not None:
phs = self.contactsoap.ContactInfo.Phones
if phs is not None and phs.ContactPhone is not None:
for phone in phs.ContactPhone:
if phone.ContactPhoneType == 'ContactPhoneMobile':